from django.contrib import admin
from django.urls import path,include,re_path
from rest_framework_simplejwt.views import TokenObtainPairView,TokenRefreshView,TokenVerifyView
from user.views import SendSmsViews,MobileApiView,LoginViews,UserinfoViews,CreateUserViews,RegisterView
from rest_framework import routers
router = routers.DefaultRouter()
router.register("userinfo",UserinfoViews)
urlpatterns = [
    path('jwt/access/', TokenObtainPairView.as_view()),
    path('jwt/refresh/', TokenRefreshView.as_view()),
    path('jwt/verify/', TokenVerifyView.as_view()),
    path('createuser/', CreateUserViews.as_view()),
    re_path(r"^sendsms/(?P<mobile>1[3-9]\d{9})/$",SendSmsViews.as_view()),
    re_path(r'^mobile/(?P<mobile>1[3-9]\d{9})/$', MobileApiView.as_view()),
    path("login/",LoginViews.as_view()),
    path("register/",RegisterView.as_view()),
] + router.urls
